import 'package:base_plugin/base_plugin.dart';
import 'package:finance_app/src/common/app_colors.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';

class SettingItem extends StatelessWidget {
  final VoidCallback onTap;
  final String svgPath;
  final String title;
  final String content;

  SettingItem({Key key, this.onTap, this.svgPath, this.title, this.content})
      : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Padding(
      padding:
          EdgeInsets.symmetric(horizontal: getDp(16), vertical: getDp(7.5)),
      child: PressedOpacityButton(
        onPressed: onTap,
        color: Colors.white,
        padding: EdgeInsets.symmetric(
          vertical: getDp(12),
          horizontal: getDp(30),
        ),
        boxShadow: [
          BoxShadow(
              color: Colors.black.withOpacity(0.25),
              offset: Offset(0, 1),
              blurRadius: getDp(10),
              spreadRadius: -getDp(3))
        ],
        child: Row(
          children: [
            SvgPicture.asset(
              svgPath,
              width: getDp(20),
              height: getDp(20),
              fit: BoxFit.contain,
            ),
            SizedBox(
              width: getDp(26),
            ),
            Expanded(
                child: Column(
              crossAxisAlignment: CrossAxisAlignment.start,
              children: [
                Text(
                  title,
                  style: TextStyle(
                    color: aceBlackColor,
                    fontSize: getSp(16),
                    fontWeight: FontWeight.w700,
                    height: 22 / 16,
                  ),
                ),
                SizedBox(
                  height: getDp(2),
                ),
                Text(
                  content,
                  style: TextStyle(
                    color: aceDarkGrayColor,
                    fontSize: getSp(14),
                    fontWeight: FontWeight.w400,
                    height: 22 / 14,
                  ),
                )
              ],
            ))
          ],
        ),
      ),
    );
  }
}
